import React from 'react'
import { Link } from 'react-router-dom'
import { useNavigate } from 'react-router-dom'
export default function Login() {
  const navigate = useNavigate()
  return (
    <div>
      我是登录页
      <Link to='/article'>跳转至文章页</Link>
      <Link to='/layout'>跳转至layout</Link>
      <button onClick={() => navigate('/article/1001/申伟/张三')}>跳转至文章页</button>
      <button onClick={() => navigate('/article?id=1001&name=申伟&user=张三')}>跳转至文章页</button>
    </div>
  )
}
